#ifndef YESNOPORTROL_H
#define YESNOPORTROL_H

#include "ModalLayer.h"
#include "cocos-ext.h"

USING_NS_CC_EXT;

class YesNoPortrol;

/*********************| marcos |*********************/

#define TITLE_TEXT_COLOR				ccc3(39, 104, 24)
typedef void (CCObject::*SEL_YesFunc)(YesNoPortrol*);
#define yesfunc_selector(_SELECTOR) 		(SEL_YesFunc)(&_SELECTOR)

/*********************| class |*********************/

class YesNoPortrol : public ModalLayer
{
public:
	virtual const size_t		getRetCode()= 0;
public:
	void				setYesFunc(CCObject* sender, SEL_YesFunc selecor);
protected:
	bool				init(const char* titleStr, CCSize size);
private:
	void				noCB(CCObject* obj);
	void				yesCB(CCObject* obj);
protected:
	CCObject*			_yesSender;
	SEL_YesFunc			_yesSelector;
	CCScale9Sprite*			_bg;
	CCSpriteBatchNode*		_lineBatch;
};

#endif // YESNOPORTROL_H
